/* 基础样式 */
body {
    line-height: 1.6;
}

/* 导航栏下拉菜单动画 */
nav .group:hover .opacity-0 {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 图片展示区渐变遮罩 */
section:nth-of-type(3) {
    position: relative;
}

section:nth-of-type(3)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 68, 148, 0.7), rgba(0, 68, 148, 0.2));
    z-index: 1;
}

section:nth-of-type(3) * {
    position: relative;
    z-index: 2;
}

/* 新闻卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 主内容区图片悬停效果 */
section:nth-of-type(5) .overflow-hidden img {
    transition: transform 0.5s ease;
}

section:nth-of-type(5) .overflow-hidden:hover img {
    transform: scale(1.1);
}

/* 专题网站版块颜色交替 */
section:nth-of-type(6) .grid div:nth-child(odd) .h-24 {
    background-color: #004494;
}

section:nth-of-type(6) .grid div:nth-child(even) .h-24 {
    background-color: #E60012;
}

/* 响应式布局优化 */
@media (max-width: 768px) {
    header .flex {
        flex-direction: column;
        align-items: center;
    }

    header .flex div {
        margin-bottom: 20px;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        width: 100%;
        text-align: center;
    }

    nav ul li .absolute {
        position: relative;
        width: 100%;
        opacity: 1;
        visibility: visible;
        display: none;
    }

    nav ul li:hover .absolute {
        display: block;
    }

    section:nth-of-type(3) h2 {
        font-size: 2rem;
    }

    section:nth-of-type(3) p {
        font-size: 1rem;
    }

    section:nth-of-type(3) a {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    section:nth-of-type(6) .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}